#pragma once

#include "../DefinesCore.hpp"
#include <string>
#include <vector>

CYBERTRON_BEGIN

class UtilPath
{
public:
	CybertronCoreAPI static std::string getExecutableFile();
	CybertronCoreAPI static std::string getExecutablePath();
	CybertronCoreAPI static std::string getWorkingPath();
	CybertronCoreAPI static bool setWorkingPath(const std::string& path);

	CybertronCoreAPI static std::string combine(const std::string& rootPath, const std::string& subPath);
	CybertronCoreAPI static std::string getDir(const std::string& path);
	CybertronCoreAPI static void getFilesInDir(const std::string& path, const std::string& fileExt, std::vector<std::string>& files);

	CybertronCoreAPI static std::string normalizePath(const std::string& path);
	CybertronCoreAPI static std::string appendTailSlash(const std::string& path);
	CybertronCoreAPI static size_t findLastSlashPosition(const std::string& filename);
	CybertronCoreAPI static std::string getPathWithoutFilename(const std::string& filename);
	CybertronCoreAPI static std::string getFilenameWithoutPath(const std::string& filename);
	CybertronCoreAPI static std::string getBasenameWithoutPath(const std::string& filename);
	CybertronCoreAPI static std::string getPathWithoutFileExtension(const std::string& filename);
	CybertronCoreAPI static std::string getExtension(const std::string& filename);
	CybertronCoreAPI static std::string getExtensionLower(const std::string& filename);
	CybertronCoreAPI static bool isRelative(const std::string& path);
};

CYBERTRON_END
